<template>
  <el-input
    v-model="val"
    @input="inputEnter"
    :style="column.style"
    type="textarea"
    rows="5"
    :placeholder="column.placeholder || '请输入' + column.label"
  ></el-input>
  <!--  -->
</template>

<script>
export default {
  name: 'InputCom',
  props: {
    value: {
      type: [String, Number],
      default: '',
    },
    column: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      val: '',
    }
  },
  watch: {
    value: {
      handler(newVal) {
        this.val = newVal
      },
      immediate: true,
    },
  },
  methods: {
    inputEnter() {
      this.$emit('update:value', this.val)
    },
  },
}
</script>

<style scoped lang="scss"></style>
